package com.yowasa.xiuxian.entity.enums;

import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

@Getter
@AllArgsConstructor
public enum  DungeonEnum {
    DAN_YAO(1, "蒙德",8, Lists.newArrayList("凛风奔狼的怀乡","狮牙斗士的理想","高塔孤王的碎梦"),1),
    LING_YAO(2, "璃月",16,Lists.newArrayList("漆黑陨铁的一块","孤云寒林的神体","雾海云间的转还"),2)
    ;
    //类型编号
    private int id;
    //名称
    private String name;

    private Integer mapId;

    private List<String> dropItem;

    private int level;
    public static DungeonEnum getById(int id) {
        return Arrays.stream(DungeonEnum.values()).filter(e -> e.getId() == id).findFirst().orElse(null);
    }


    public static DungeonEnum getByMap(Integer mapId) {
        return Arrays.stream(DungeonEnum.values()).filter(e -> e.getMapId() == mapId).findFirst().orElse(null);
    }
}
